]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[genericDisplay] Fix selection not being set correctly
authorColin Walters <walters@verbum.org>
Fri, 13 Nov 2009 19:27:25 +0000 (14:27 -0500)
committerColin Walters <walters@verbum.org>
Fri, 13 Nov 2009 19:49:45 +0000 (14:49 -0500)
We need to check if the display actor is an instance of Shell.OverflowList
or St.BoxLayout to use the appropriate function for getting its child
with a given index.

js/ui/genericDisplay.js

index 8ee03343bddc8f8fd6f109c9eb0d802149726279..d5c3e3f3868f3a44fe8196d79bdf14adc7297837 100644 (file)
@@ -734,7 +734,11 @@ GenericDisplay.prototype = {
     // Returns a display item based on its index in the ordering of the
     // display children.
     _findDisplayedByIndex: function(index) {
-        let actor = this._list.get_children()[index];
+        let actor;
+        if (this.actor instanceof Shell.OverflowList)
+            actor = this.actor.get_displayed_actor(index);
+        else
+            actor = this._list.get_children()[index];
         return this._findDisplayedByActor(actor);
     },